package chapter.two.five;
/**
 * 2.5 使用锁实现同步
 * lock锁
 * @author UCMED
 *
 */
public class Main {
	public static void main(String[] args) {
		PrintQueue printQueue=new PrintQueue();
		Thread[] thread = new Thread[10];
		for(int i = 0; i < thread.length; i++) {
			thread[i] = new Thread(new Job(printQueue), "Thread "+i); 
		}
		
		for(int i = 0; i < thread.length; i ++) {
			thread[i].start();
		}
	}
}
